Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Cluster Settings v2 Update for Cassandra #525

Merged
merged 1 commit into from
Aug 16, 2023
Merged

added Cluster Settings v2 Update for Cassandra #525

merged 1 commit into from
Aug 16, 2023

Conversation

ribaraka
Copy link
Contributor

@ribaraka ribaraka commented Aug 14, 2023

Ref #521

  • Added the description to all clusters CRDs
  • Implemented interaction with Instaclustr API v2 to update 2FD and description
  • Adjusted validation webhook.

Comment on lines +145 to +146
if len(old) == 0 && len(new) == 0 ||
len(old) == 0 && len(new) == 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of double check, you can do:

if len(old) == 0 && len(new) < 2 {
    return nil
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to explicitly show that the new object can be validated successfully as if it were empty or with only one object populated. len(new) < 2 is cleaner but less readable imho.

@worryg0d worryg0d self-requested a review August 15, 2023 09:03
@ribaraka ribaraka changed the title added Cluster Settings v2 Update added Cluster Settings v2 Update for Cassandra Aug 16, 2023
@taaraora taaraora merged commit 1fd8cfd into main Aug 16, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants